package com.gfxy.service.impl;

import com.gfxy.mapper.NoticeMapper;
import com.gfxy.service.INoticeService;
import com.gfxy.vo.Notice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class NoticeService implements INoticeService {
    @Autowired
    private NoticeMapper noticeMapper;

    @Override
    public int insertNotice(Notice notice) {

        return noticeMapper.insertNotice(notice);
    }

    @Override
    public Notice selectNoticeById(Integer id) {
        return noticeMapper.selectNoticeById(id);
    }

    @Override
    public int updateNotice(Notice notice) {
        return noticeMapper.updateNotice(notice);
    }

    @Override
    public List<Notice> selectNoticeList(Notice notice) {
        return noticeMapper.selectNoticeList(notice);
    }

    @Override
    public List<Notice> selectNotice(Notice notice) {
        return noticeMapper.selectNotice(notice);
    }


    public int deleteNoticeById(Integer id){
        return noticeMapper.deleteNoticeById(id);
    }
}
